package com.veezean.codereview.server.erupt;

import org.springframework.stereotype.Component;
import xyz.erupt.annotation.fun.VLModel;
import xyz.erupt.core.util.EruptAssert;
import xyz.erupt.upms.handler.DictChoiceFetchHandler;
import xyz.erupt.upms.model.EruptDictItem;

import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 添加类描述
 *
 * @author tww
 * @date 2023/8/21 15:31
 */
@Component
public class Dict2ChoiceFetchHandler extends DictChoiceFetchHandler {

    @Override
    public List<VLModel> fetch(String[] params) {
        List<VLModel> listVl = super.fetch(params);
        for (VLModel vl:listVl) {
            vl.setValue(vl.getLabel());
        }
        return listVl;
    }
}
